import axios from "axios";

const request = axios.create({
  timeout: 10000,
});

request.interceptors.response.use(
  //拦截器 将需要的内容筛选 返回需要的数据
  (response) => {
    const data = response.data;
    return data;
  },
  (error) => {
    return Promise.reject(error);
  }
);

export default request;
